// Copyright @ ChenChao

#pragma once

#include "CoreMinimal.h"
#include "AnimInstances/WarriorCharacterAnimInstance.h"
#include "WarriorHeroAnimInstance.generated.h"

class AWarriorHeroCharacter;
/**
 * 
 */
UCLASS()
class WARRIOR_API UWarriorHeroAnimInstance : public UWarriorCharacterAnimInstance
{
	GENERATED_BODY()
	
public:
	//原生初始化动画
	virtual void NativeInitializeAnimation() override;

	//原生线程安全更新动画
	virtual void NativeThreadSafeUpdateAnimation(float DeltaSeconds) override;

protected:
	//所属英雄角色
	UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "AnimData|Refrences")
	AWarriorHeroCharacter* OwningHeroCharacter;

	//是否进入休闲状态？
	UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "AnimData|LocomotionData")
	bool bShouldEnterRelaxState =false;

	//进入松弛状态阈值
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "AnimData|LocomotionData")
	float EnterRelaxStateThreshold = 5.f;

	//角色处于空闲状态的持续时间
	UPROPERTY()
	float IdleElapsedTime = 0.f;
};
